<?php

namespace app\common\model\Product;

// 引入TP基础模型
use think\Model;

// 产品分类模型
class  Type extends Model
{
    protected $name = 'product_type';

    protected $append = [
        'thumbs_text'
    ];

    protected function getThumbsTextAttr($value, $data) {

        $thumbs = !empty($data['thumb']) ? $data['thumb'] : '/assets/img/product.jpg';

        return $thumbs;

    }
}